import React, { Component, createContext } from "react";
import Child from "./Child";

export const context = createContext();

class App extends Component {
  state = {};
  render() {
    return (
      <context.Provider
        value={{
          count: 10,
        }}
      >
        <h2>context上下文</h2>
        <Child />
      </context.Provider>
    );
  }
}

export default App;
